<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">

    <ui:composition>
        <a4j:loadStyle src="/resources/css/com.css"/>
        <h:form id="userlistform">
            <div>
                <h:outputText value="请输入查询条件" styleClass="com_title"/>
            </div>
            <div> <h:outputText value="校友ID:" styleClass="com_label"/>
                <h:inputText id="db_user_id" value="" /> &nbsp;&nbsp;&nbsp;
                <h:outputText value="姓名:" styleClass="com_label"/>
                <h:inputText id="db_user_name" value="" /> &nbsp;&nbsp;&nbsp;
                <h:outputText value="专业:" styleClass="com_label"/>
                <h:inputText id="db_major" value="" /> &nbsp;&nbsp;&nbsp;
                <h:outputText value="所在区:" styleClass="com_label"/>
                <h:inputText id="db_sz_district" value="" /> &nbsp;&nbsp;&nbsp;
            </div>
            <div>
                <h:outputText value="毕业年份:" styleClass="com_label"/>
                <h:outputText  value="从" styleClass="com_text"/>
                <h:inputText id="dbfrom_graduate_year" value="" />
                <h:outputText value="到" styleClass="com_text"/>
                <h:inputText id="dbto_graduate_year" value="" /> &nbsp;&nbsp;
                <h:outputText value="注册日期:" styleClass="com_label"/>
                <h:outputText  value="从" styleClass="com_text"/>
                <h:inputText id="dbdatefrom_create_time" value="" />
                <h:outputText value="到" styleClass="com_text"/>
                <h:inputText id="dbdateto_create_time" value="" /> &nbsp;&nbsp;
            </div>
            <table>
                <tr>
                    <td><h:selectOneRadio id="db_status" value="" styleClass="com_text">
                            <f:selectItem itemLabel="未激活/冻结" itemValue="N" />
                            <f:selectItem itemLabel="已激活" itemValue="Y"  />
                            <f:selectItem itemLabel="任意" itemValue=""  />
                        </h:selectOneRadio>
                    </td>
                    <td>
                        按<h:selectOneMenu>
                            <f:selectItem itemLabel="注册日期" itemValue="N" />
                            <f:selectItem itemLabel="毕业年份" itemValue="Y"  />
                            <f:selectItem itemLabel="所在区" itemValue=""  />
                            <f:selectItem itemLabel="专业" itemValue="N" />
                            <f:selectItem itemLabel="姓名" itemValue="Y"  />
                            <f:selectItem itemLabel="校友ID" itemValue=""  />
                        </h:selectOneMenu>
                        <h:selectOneMenu>
                            <f:selectItem itemLabel="从大到小" itemValue="N" />
                            <f:selectItem itemLabel="从小到大" itemValue="Y"  />
                        </h:selectOneMenu>排序
                    </td>
                    <td>
                        &nbsp; &nbsp;<a4j:commandButton value="查询" 
                                           action="#{adminManageMbean.newSelectUsersAction}"
                                           reRender="userList,pagenum,maxpage,prebutton,nextbutton"/>
                    </td>
                </tr>
            </table>
            <rich:dataTable  id="userList"  columnClasses="com_text" width="100%"
                             onRowMouseOut="this.style.backgroundColor='#F1F1F1'"
                             onRowMouseOver="this.style.backgroundColor='#1F1F1F'"
                             value="#{adminManageMbean.users}" var="user" >
                <rich:column>
                    <f:facet name="header"><h:outputText styleClass="headerText" value="校友ID" /></f:facet>
                    <h:outputText value="#{user.USER_ID}" />
                </rich:column>
                <rich:column >
                    <f:facet name="header"><h:outputText styleClass="headerText" value="校友姓名" /></f:facet>
                    <h:outputText value="#{user.NAME}" />
                </rich:column>
                <rich:column>
                    <f:facet name="header"><h:outputText styleClass="headerText" value="毕业年份" /></f:facet>
                    <h:outputText value="#{user.GRADUATE_YEAR}" />
                </rich:column>
                <rich:column >
                    <f:facet name="header"><h:outputText styleClass="headerText" value="专业" /></f:facet>
                    <h:outputText value="#{user.MAJOR}"  />
                </rich:column>
                <rich:column>
                    <f:facet name="header"><h:outputText styleClass="headerText" value="所在区" /></f:facet>
                    <h:outputText value="#{user.SZ_DISTRICT}" />
                </rich:column>
                <rich:column >
                    <f:facet name="header"><h:outputText styleClass="headerText" value="注册时间" /></f:facet>
                    <h:outputText value="#{user.CREATE_TIME}" />
                </rich:column>
                <rich:column >
                    <f:facet name="header"><h:outputText styleClass="headerText" value="状态" /></f:facet>
                    <h:outputText value="#{user.STATUS=='Y'?'已经激活':'未激活'}" />
                </rich:column>

                <rich:column >
                    <f:facet name="header"><h:outputText styleClass="headerText" value="操作" /></f:facet>

                    <a4j:commandButton value="修改" action="#{adminManageMbean.selectUserAction}" immediate="true"  >
                        <f:param  name="usermainid" value="#{user.ID}"/>
                    </a4j:commandButton>

                    <h:commandButton value="删除" immediate="true"  >
                        <f:param  name="usermainid" value="#{user.ID}"/>
                    </h:commandButton>
                </rich:column>
            </rich:dataTable>
                    <div align="center" >
                        <a4j:commandButton id="prebutton" value="上一页" action="#{adminManageMbean.prePageUsersAction}"  disabled="#{adminManageMbean.pageNum==1}"  reRender="userList,pagenum,maxpage,prebutton,nextbutton" />
                        <a4j:commandButton id="nextbutton" value="下一页" action="#{adminManageMbean.nextPageUsersAction}"  disabled="#{adminManageMbean.pageNum==adminManageMbean.maxPage||adminManageMbean.maxPage==1}"  reRender="userList,pagenum,maxpage,prebutton,nextbutton" />
                        <a4j:commandButton id="changepage" value="转到" action="#{adminManageMbean.selectUsersAction}" style="display:" reRender="userList,pagenum,maxpage,prebutton,nextbutton"  />
                        第
                    <h:selectOneMenu id="pagenum" value="#{adminManageMbean.pageNum}"  >
                        <f:selectItems value="#{adminManageMbean.pageNums}"/>
                          
                    </h:selectOneMenu>
                        页/共
                        <h:outputText id="maxpage" value="#{adminManageMbean.maxPage}" />
                        页
                    </div>
        </h:form>
    </ui:composition>

</html>